package edu.thu.studio.ormdesigner.persistent;

import java.io.IOException;
import java.io.InputStream;

import edu.thu.studio.ormdesigner.model.ORMModel;
import edu.thu.studio.ormdesigner.persistent.impl.PersistentXmlImpl;

public abstract class Persistent {
    
    private static Persistent persistent = new PersistentXmlImpl();
    
    public static Persistent getInstance() {
        return persistent;
    }
    
    abstract public InputStream createInputStream(ORMModel diagram) throws IOException;
    
    abstract public ORMModel load(InputStream in) throws Exception;
    
}